package Job03.Triagle;

import Job03.Shapes.Shapes;

public class Triagle extends Shapes {
    private double a;
    private double b;
    private double c;

    public double getA() {
        return a;
    }
    public void setA(double a) {
        this.a = a;
    }
    public double getB() {
        return b;
    }
    public void setB(double b) {
        this.b = b;
    }
    public double getC() {
        return c;
    }
    public void setC(double c) {
        this.c = c;
    }

    public Triagle(double a, double b, double c) {
        this.a = a;
        this.b = b;
        this.c = c;
    }

    public Triagle() {
    }

    @Override
    public void Shapes() {
        System.out.println("三角形周长和面积");
    }

    @Override
    public void area() {
        System.out.println("面积:" +(this.getA()+this.getB()+this.getC())/2);
    }

    @Override
    public void c() {
        System.out.println("周长:" +(6*(6-this.getA())*(6-this.getB())*(6-this.getC())));
    }
}
